<?xml version="1.0" encoding="utf-8"?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title>Flex -> Javascript -> Flex</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

		<!-- firefox won't show the content correctly without this -->
		<style type="text/css" media="screen">
			html, body, #myContent	{ height:100%; }
			body						{ margin:0; padding:0; overflow:hidden; }
			#myAlternativeContent		{ /* style alt content */ }
		</style>	
		
		<script type="text/javascript" src="javascripts/swfobject.js"></script>
		<script type="text/javascript" src="javascripts/prototype.js"></script>
		<script type="text/javascript">
			
			function init() {
				var flashvars = {};
				var params = {};
				params.quality = "high";
				params.bgcolor = "#ffffff";
				params.allowfullscreen = "true";
				params.allowscriptaccess = "sameDomain";
				var attributes = {};
				attributes.id = "flexApplication";
				swfobject.embedSWF("index.swf", "flashContent", "100%", "50%", "9.0.115", false, flashvars, params, attributes);
			}
			
			function flexSays(something) {
				$('flexSays').update(something);
			}
			
			function tellFlex() {
				$('flexApplication').htmlSays( $('tellFlexString').getValue() )
			}
		</script>
	</head>
	<body onLoad="init()">
		<div id="flashContent">
			<a href="http://www.adobe.com/go/getflashplayer">
				<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
			</a>
		</div>
		<div id="htmlContent" align="center">
			<strong>Tell Flex:</strong>
			<div id="tellFlex">
				<input id="tellFlexString" type="text" />
				<br/>
				<input id="tellFlexButton" type="button" value="Tell Flex!" onClick="tellFlex()">
			</div>
			<br/>
			<strong>Flex Says:</strong>
			<br/>
			<div id="flexSays">
				
			</div>
		</div>
	</body>
</html>